package com.cj.rxdo;

import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.ScaleDrawable;
import android.graphics.drawable.TransitionDrawable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.WindowManager;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Toast;

import java.util.concurrent.TimeUnit;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action1;

public class DelActivity extends AppCompatActivity {
    @BindView(R.id.ml)RelativeLayout rl;
    @BindView(R.id.toolbar)Toolbar toolbar;
//    @BindView(R.id.iv)ImageView iv;
    @BindView(R.id.btn)Button btn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_del);
        ButterKnife.bind(this);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        toolbar.setTitle("Title");
        setSupportActionBar(toolbar);


        Observable.timer(1000,TimeUnit.MILLISECONDS)
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Action1<Long>() {
                    @Override
                    public void call(Long aLong) {

                    }
                });

    }

    @OnClick(R.id.ml)
    void setRl(){
        btn.startAnimation(AnimationUtils.loadAnimation(DelActivity.this,R.anim.a));
    }
}
